package model01;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class ReadIntegerFromFile {
	public static void main(String[] args) {
		File f;
		Scanner s;
		
		try {
			//mo file integer.txt
			f = new File("integerfile.txt");
			
			//du lieu nhap vao tu file integerfile.txt
			s = new Scanner(f);
			int i = 1;
			
			//trong kho con du lieu de doc
			while(s.hasNext()) {
				int n = s.nextInt();
				System.out.println("So thu " + i + ": " + n);
				i++;
			}
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

}
